from writer import hwriter
from writer import bwriter
import time 
from paramsetup import Param

class Verify_search():       
    
    @hwriter
    def __init__(self):
        self.user = Param.user        
            
    @bwriter(True)
    def step1(self):
        '''input keywords'''
        self.user.type("id=kw", "python developer")
        self.user.click("id=su")
        self.user.wait_for_page_to_load("30000")
        
    @bwriter(True)
    def step2(self):
        '''check if text is present'''
        print self.user.is_text_present("Python Developer Center - Yahoo! Developer Network")



    def run(self):        
        self.user.step1()
        self.user.step2() 